72420c79cbaf1c0c625a4d38c01980b8db564ad3,org.springframework.context/src/main/java/org/springframework/scheduling/config/ScheduledTasksBeanDefinitionParser.java,ScheduledTasksBeanDefinitionParser,doParse,#Element#ParserContext#BeanDefinitionBuilder#,52

Before Change


			RuntimeBeanReference runnableBeanRef = new RuntimeBeanReference(
					createRunnableBean(ref, method, taskElement, parserContext));
			String cronAttribute = taskElement.getAttribute("cron");
			if (StringUtils.hasText(cronAttribute)) {
				cronTaskMap.put(runnableBeanRef, cronAttribute);
			}
			else {

After Change


			String fixedRateAttribute = taskElement.getAttribute("fixed-rate");
			String triggerAttribute = taskElement.getAttribute("trigger");

			boolean hasCronAttribute = StringUtils.hasText(cronAttribute);
			boolean hasFixedDelayAttribute = StringUtils.hasText(fixedDelayAttribute);
			boolean hasFixedRateAttribute = StringUtils.hasText(fixedRateAttribute);
			boolean hasTriggerAttribute = StringUtils.hasText(triggerAttribute);

			if (!(hasCronAttribute | hasFixedDelayAttribute | hasFixedRateAttribute | hasTriggerAttribute)) {
				parserContext.getReaderContext().error(
						"exactly one of the 'cron', 'fixed-delay', 'fixed-rate', or 'trigger' attributes is required", taskElement);
				// Continue with the possible next task element
				continue;
			}

			if (hasCronAttribute) {
				cronTaskMap.put(runnableBeanRef, cronAttribute);
			}
			if (hasFixedDelayAttribute) {